IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > SerializationFns Class > Save Method : Save(Object,Stream,Boolean,IEnumerable<Type>,Boolean) Method |
'Declaration
Public Overloads Shared Sub Save( _ ByVal instance As Object, _ ByVal stream As Stream, _ ByVal closeOnExit As Boolean, _ Optional ByVal knownTypes As IEnumerable(Of Type), _ Optional ByVal useBinary As Boolean _ )
'Usage
Dim instance As Object Dim stream As Stream Dim closeOnExit As Boolean Dim knownTypes As IEnumerable(Of Type) Dim useBinary As Boolean SerializationFns.Save(instance, stream, closeOnExit, knownTypes, useBinary)
public static void Save( object instance, Stream stream, bool closeOnExit, IEnumerable<Type> knownTypes, bool useBinary )
If the UseDCS flag is on, the object is serialized with the DataContractSerializer; otherwise the NetDataContractSerializer is used. UseDCS is on by default, and is assumed to be on in Silverlight, where the NDCS serializer is not supported.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2